package com.wlanauth.vo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 视图类
 * @author zz
 * @date 2012-5-20
 * @email charles.zz.life@gmail.com
 */
public class UserVO implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private String id;
	
	private String username;
	
	private String password;
	
	private String displayname;
	private Date joinTime;//入网时间
	
	private Date activeTime;//激活时间
	
	private Date expiredTime;//过期时间
	
	private Float maxOctets;//最大流量(M)
	
	private String bindIP;//绑定的IP
	
	private String contactPhone;//联系电话
	
	private String email;//邮箱
	
	private Date birth;//生日
	
	private String address;//地址
	
	private String description;//备注
	private String status;
	
	private String sexId;
	
	private String userType;
	
	
	private BigDecimal sumInputOctets ;//单位B
	
	private BigDecimal sumOutputOctets ;//单位B

	private Double sumFee;
	
	private Double maxFee;
	

	private Double ratedFee;//应付金额
	private Double actualFee;//实付金额
	
	private String batchId;//导入批次
	
	private String puk;//PUK码
	
	private Date lastAcctStartTime;//最后登陆开始时间
	private Date lastAcctStopTime;//最后登陆结束时间
	
	
	public String getSexId() {
		return sexId;
	}

	public void setSexId(String sexId) {
		this.sexId = sexId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getDisplayname() {
		return displayname;
	}

	public void setDisplayname(String displayname) {
		this.displayname = displayname;
	}

	public Date getJoinTime() {
		return joinTime;
	}

	public void setJoinTime(Date joinTime) {
		this.joinTime = joinTime;
	}

	public Date getActiveTime() {
		return activeTime;
	}

	public void setActiveTime(Date activeTime) {
		this.activeTime = activeTime;
	}

	public Date getExpiredTime() {
		return expiredTime;
	}

	public void setExpiredTime(Date expiredTime) {
		this.expiredTime = expiredTime;
	}

	

	public Float getMaxOctets() {
		return maxOctets;
	}

	public void setMaxOctets(Float maxOctets) {
		this.maxOctets = maxOctets;
	}

	public String getBindIP() {
		return bindIP;
	}

	public void setBindIP(String bindIP) {
		this.bindIP = bindIP;
	}

	public String getContactPhone() {
		return contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	


	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public Double getSumFee() {
		return sumFee;
	}

	public void setSumFee(Double sumFee) {
		this.sumFee = sumFee;
	}

	public Double getMaxFee() {
		return maxFee;
	}

	public void setMaxFee(Double maxFee) {
		this.maxFee = maxFee;
	}

	public BigDecimal getSumInputOctets() {
		return sumInputOctets;
	}

	public void setSumInputOctets(BigDecimal sumInputOctets) {
		this.sumInputOctets = sumInputOctets;
	}

	public BigDecimal getSumOutputOctets() {
		return sumOutputOctets;
	}



	public Double getRatedFee() {
		return ratedFee;
	}

	public void setRatedFee(Double ratedFee) {
		this.ratedFee = ratedFee;
	}

	public Double getActualFee() {
		return actualFee;
	}

	public void setActualFee(Double actualFee) {
		this.actualFee = actualFee;
	}

	public void setSumOutputOctets(BigDecimal sumOutputOctets) {
		this.sumOutputOctets = sumOutputOctets;
	}

	public String getBatchId() {
		return batchId;
	}

	public void setBatchId(String batchId) {
		this.batchId = batchId;
	}

	public String getPuk() {
		return puk;
	}

	public void setPuk(String puk) {
		this.puk = puk;
	}
	
	public Date getLastAcctStopTime() {
		return lastAcctStopTime;
	}

	public void setLastAcctStopTime(Date lastAcctStopTime) {
		this.lastAcctStopTime = lastAcctStopTime;
	}

	public Date getLastAcctStartTime() {
		return lastAcctStartTime;
	}

	public void setLastAcctStartTime(Date lastAcctStartTime) {
		this.lastAcctStartTime = lastAcctStartTime;
	}

	public BigDecimal getSumOctets(){
		if(this.sumInputOctets == null){
			this.sumInputOctets = BigDecimal.valueOf(0L);
		}
		if(this.sumOutputOctets == null){
			this.sumOutputOctets = BigDecimal.valueOf(0L);
		}
		return this.sumInputOctets.add(this.sumOutputOctets);
	}
}
